﻿using System;
using System.Net;
using Nutshell.Data.Serializing;
using Nutshell.Distributing;
using Nutshell.Log;
using Nutshell.Messaging.Models;
using Nutshell.NetMQ;

namespace Nutshell.DSS.TestUI
{
        internal class Program
        {
                private static void Main(string[] args)
                {
                        NLoger.Separate();

                        var endPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 10100);
                        var sender = new NetMQSender("语音合成请求发送者", endPoint);

                        var sendSite = new SendSite<StringValueMessageModel>("语音合成请求发送站点", sender);

                        sendSite.Start();

                        for (; ; )
                        {
                                string content = Console.ReadLine();
                                if (content == "exit")
                                {
                                        sendSite.Stop();
                                        break;
                                }

                                var model = new StringValueMessageModel(content);

                                sendSite.Send(model);
                        }
                }
        }
}
